-
Notifications
You must be signed in to change notification settings - Fork 159
Fix automatic workflow run updates with improved polling mechanism #541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…s; refine run polling log output
|
Related #285 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements an automatic polling mechanism to update workflow runs in real-time without requiring manual refresh, addressing issue #229. The solution adds intelligent polling that respects window focus and view visibility to minimize unnecessary API calls.
Key changes include:
- Automatic polling for active workflow runs (in_progress, queued, waiting, requested) with a 4-second interval for up to 15 minutes
- Window focus and view visibility tracking to pause polling when the extension is not in use
- Enhanced workflow trigger command that waits for new runs to appear and automatically starts polling them
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| src/treeViews/workflows.ts | Exports WorkflowsTreeNode type to enable access from other modules |
| src/treeViews/workflowRunTreeDataProvider.ts | Adds automatic polling initiation for active workflow runs when tree nodes are created |
| src/treeViews/treeViews.ts | Tracks workflow tree view visibility state and notifies the store |
| src/store/workflowRun.ts | Unconditionally clears job cache on run updates to ensure polling fetches latest job status |
| src/store/store.ts | Implements polling mechanism with focus/visibility checks and cleanup logic for completed runs |
| src/extension.ts | Registers window state change handler to track focus state |
| src/commands/triggerWorkflowRun.ts | Enhanced to detect newly triggered runs and automatically start polling them |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Description
This PR fixes issue #229 where newly triggered workflow runs required manual refresh to see updates in the UI. The extension now automatically polls for workflow run updates and reflects changes in real-time.
Changes
Enhanced Polling Mechanism
Key Improvements
Related Issues
Fixes #229
Testing
The fix ensures that: